package com.atguigu.day21.test03;

import java.io.*;

/**
 * @author fenge
 */
public class Test03 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream(new File("D:\\atguigu\\Day18-Map和File\\note\\尚硅谷_JavaSE_第11章 IO流.html"));
        BufferedInputStream bis = new BufferedInputStream(fis);
        FileOutputStream fos = new FileOutputStream(new File("尚硅谷_JavaSE_第11章 IO流.html"));
        BufferedOutputStream bos = new BufferedOutputStream(fos);
        byte[] bytes = new byte[1024];
        int len=bis.read(bytes);
        while (len!=-1){
            bos.write(bytes,0,len);
            len=bis.read(bytes);
        }
//        int data = bis.read();
//        while (data!=-1){
//            bos.write(data);
//            data = bis.read();
//        }
        bos.close();
        fos.close();
        bis.close();
        fis.close();
    }
}
